package com.ny.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

@Data
@Document(collection = "devices")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Devices {
    @Id
    private String id;

    @Field("device_id")
    private Integer device_id;

    @Field("name")
    private String name;

    @Field("type")
    private String type;

    @Field("status")
    private String status;

    @Field("brightness")
    private int brightness;

    @Field("room")
    private String room;

    @Field("install_time")
    private Date install_time;
    
    @Field("temp")
    private Integer temp;
    
    @Field("mode")
    private String mode;
    
    @Field("gas_level")
    private Integer gasLevel;
    
    @Field("battery")
    private Integer battery;
    
    @Field("position")
    private Integer position;
    
    @Field("resolution")
    private String resolution;
    
    @Field("brand")
    private String brand;
    
    @Field("protocol")
    private String protocol;
}